<?php
$title = '';
if (isset($columnMeta['column_status'])) {
    if ($columnMeta['column_status']['isReferenced']) {
        $title .= sprintf(
            __('Referenced by %s.'),
            implode(",", $columnMeta['column_status']['references'])
        );
    }
    if ($columnMeta['column_status']['isForeignKey']) {
        if (!empty($title)) {
            $title .= "\n";
        }
        $title .=  __('Is a foreign key.');
    }
}
if (empty($title)) {
    $title = __('Column');
}
?>
<input id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
       <?php if (isset($columnMeta['column_status'])
           && !$columnMeta['column_status']['isEditable']): ?>
           disabled="disabled"
       <?php endif; ?>
       type="text"
       name="field_name[<?= $columnNumber; ?>]"
       maxlength="64"
       class="textfield"
       title="<?= $title; ?>"
       size="10"
       value="<?= isset($columnMeta['Field'])? htmlspecialchars($columnMeta['Field']) : '' ?>" />

<?php if ($cfgRelation['centralcolumnswork']
    && !(isset($columnMeta['column_status'])
        && !$columnMeta['column_status']['isEditable'])
): ?>
    <p style="font-size:80%;margin:5px 2px"
       id="central_columns_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>">
        <a data-maxrows="<?= intval($GLOBALS['cfg']['MaxRows']); ?>"
           href="#"
           class="central_columns_dialog">
            <?= __('Pick from Central Columns'); ?>
        </a>
    </p>
<?php endif; ?>
